
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>Qcanvas说明 · Qcanvas V1.0使用文档</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        <meta name="author" content="lizhicheng">
        
        
    
    <link rel="stylesheet" href="gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-expandable-chapters-small/expandable-chapters-small.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-tbfed-pagefooter/footer.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-sidebar-style/plugin.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-auto-scroll-table/website.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-code-editor/editor.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-code/plugin.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-lightbox/css/lightbox.min.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
        <link rel="stylesheet" href="example/style/website.css">
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="qcanvas.html" />
    
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter active" data-level="1.1" data-path="./">
            
                <a href="./">
            
                    
                    Qcanvas说明
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="qcanvas.html">
            
                <a href="qcanvas.html">
            
                    
                    Qcanvas类
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="qcanvas/shu-xing.html">
            
                <a href="qcanvas/shu-xing.html">
            
                    
                    属性
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2" data-path="qcanvas/fang-fa.html">
            
                <a href="qcanvas/fang-fa.html">
            
                    
                    方法
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="qtextlei.html">
            
                <a href="qtextlei.html">
            
                    
                    Qtext类
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="qtextlei/shu-xing.html">
            
                <a href="qtextlei/shu-xing.html">
            
                    
                    属性
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="qtextlei/fang-fa.html">
            
                <a href="qtextlei/fang-fa.html">
            
                    
                    方法
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="qlinelei.html">
            
                <a href="qlinelei.html">
            
                    
                    Qline类
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="qlinelei/shu-xing.html">
            
                <a href="qlinelei/shu-xing.html">
            
                    
                    属性
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="qlinelei/fang-fa.html">
            
                <a href="qlinelei/fang-fa.html">
            
                    
                    方法
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="qrectlei.html">
            
                <a href="qrectlei.html">
            
                    
                    Qrect类
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.1" data-path="qrectlei/shu-xing.html">
            
                <a href="qrectlei/shu-xing.html">
            
                    
                    属性
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2" data-path="qrectlei/fang-fa.html">
            
                <a href="qrectlei/fang-fa.html">
            
                    
                    方法
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="qarclei.html">
            
                <a href="qarclei.html">
            
                    
                    Qarc类
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.1" data-path="qarclei/shu-xing.html">
            
                <a href="qarclei/shu-xing.html">
            
                    
                    属性
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2" data-path="qarclei/fang-fa.html">
            
                <a href="qarclei/fang-fa.html">
            
                    
                    方法
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="qanimationlei.html">
            
                <a href="qanimationlei.html">
            
                    
                    Qanimation类
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.1" data-path="qanimationlei/shu-xing.html">
            
                <a href="qanimationlei/shu-xing.html">
            
                    
                    属性
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2" data-path="qanimationlei/fang-fa.html">
            
                <a href="qanimationlei/fang-fa.html">
            
                    
                    方法
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.8" data-path="qimglei.html">
            
                <a href="qimglei.html">
            
                    
                    Qimg类
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.8.1" data-path="qimglei/shu-xing.html">
            
                <a href="qimglei/shu-xing.html">
            
                    
                    属性
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.2" data-path="qimglei/fang-fa.html">
            
                <a href="qimglei/fang-fa.html">
            
                    
                    方法
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.9" data-path="qspiritlei.html">
            
                <a href="qspiritlei.html">
            
                    
                    Qspirit类
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.9.1" data-path="qspiritlei/shu-xing.html">
            
                <a href="qspiritlei/shu-xing.html">
            
                    
                    属性
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9.2" data-path="qspiritlei/fang-fa.html">
            
                <a href="qspiritlei/fang-fa.html">
            
                    
                    方法
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.10" data-path="qshapelei.html">
            
                <a href="qshapelei.html">
            
                    
                    Qshape类
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.10.1" data-path="qshapelei/shu-xing.html">
            
                <a href="qshapelei/shu-xing.html">
            
                    
                    属性
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.11" data-path="qlayerlei.html">
            
                <a href="qlayerlei.html">
            
                    
                    Qlayer类
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.11.1" data-path="shu-xing.html">
            
                <a href="shu-xing.html">
            
                    
                    属性
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11.2" data-path="fang-fa.html">
            
                <a href="fang-fa.html">
            
                    
                    方法
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.12" data-path="qgrouplei.html">
            
                <a href="qgrouplei.html">
            
                    
                    Qgroup类
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.12.1" data-path="qgrouplei/fang-fa.html">
            
                <a href="qgrouplei/fang-fa.html">
            
                    
                    方法
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.13" data-path="qpolygonlei.html">
            
                <a href="qpolygonlei.html">
            
                    
                    Qpolygon类
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.13.1" data-path="qpolygonlei/shu-xing.html">
            
                <a href="qpolygonlei/shu-xing.html">
            
                    
                    属性
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.14" data-path="qquadraticCurve.html">
            
                <a href="qquadraticCurve.html">
            
                    
                    QquadraticCurve类
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.14.1" data-path="qquadraticCurve/shu-xing.html">
            
                <a href="qquadraticCurve/shu-xing.html">
            
                    
                    属性
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.14.2" data-path="qquadraticCurve/fang-fa.html">
            
                <a href="qquadraticCurve/fang-fa.html">
            
                    
                    方法
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.15" data-path="qbezierCurve.html">
            
                <a href="qbezierCurve.html">
            
                    
                    QbezierCurve类
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.15.1" data-path="qbezierCurve/shu-xing.html">
            
                <a href="qbezierCurve/shu-xing.html">
            
                    
                    属性
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.15.2" data-path="qbezierCurve/fang-fa.html">
            
                <a href="qbezierCurve/fang-fa.html">
            
                    
                    方法
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="." >Qcanvas说明</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="qcanvas-v20">Qcanvas v2.0</h1>
<p>2021-09-06 Qcanvas 2.0&#x521D;&#x7248;&#x5DF2;&#x7ECF;&#x5F00;&#x53D1;&#x5B8C;&#x6BD5;, &#x529F;&#x80FD;&#x4FDD;&#x6301;&#x548C;1.x&#x7684;&#x540C;&#x6B65;&#xFF0C;&#x6B7B;&#x4E86;&#x4E0D;&#x5C11;&#x8111;&#x7EC6;&#x80DE;&#xFF0C;&#x56E0;&#x4E3A;&#x662F;&#x57FA;&#x4E8E;1.x&#x7684;&#xFF0C;&#x6240;&#x4EE5;&#x82B1;&#x8D39;&#x65F6;&#x95F4;&#x5C11;&#x4E00;&#x70B9;&#xFF0C;&#x5927;&#x7EA6;&#x82B1;&#x4E86;40&#x591A;&#x4E2A;&#x5C0F;&#x65F6; &#xFF08;&#x5305;&#x62EC;&#x793A;&#x4F8B;&#x6D4B;&#x8BD5;&#xFF09;.</p>
<p>&#x5730;&#x5740;&#xFF1A;<a href="https://github.com/zhicheng99/qcanvas" target="_blank">https://github.com/zhicheng99/qcanvas</a></p>
<p>&#x6CE8;&#xFF1A;v1.x&#x4EE5;&#x540E;&#x4E0D;&#x518D;&#x589E;&#x52A0;&#x65B0;&#x529F;&#x80FD;   </p>
<p>&#x4E24;&#x4E2A;&#x7248;&#x672C;&#x4E3B;&#x8981;&#x533A;&#x522B;&#x5982;&#x4E0B;</p>
<table>
<thead>
<tr>
<th>&#x5E8F;&#x53F7;</th>
<th>&#x533A;&#x522B;&#x70B9;</th>
<th>v1.x</th>
<th>v2.0</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>&#x753B;&#x5E03;&#x521D;&#x59CB;&#x5316;</td>
<td>new Qcanvas([&quot;qcanvas&quot;,300,200]);            &#x6216;            <br>new Qcanvas({                <br>id:&apos;qcanvas&apos;,<br>                width:300,<br>                height:200<br>            })</td>
<td>new Qcanvas({                id:&apos;qcanvas&apos;,<br>                width:300,<br>                height:200<br>            })</td>
</tr>
<tr>
<td>2</td>
<td>&#x7EBF;&#x6BB5;&#x5B9E;&#x59CB;&#x5316;</td>
<td>qcanvas.qline.line(...options)</td>
<td>qcanvas.line(...options)</td>
</tr>
<tr>
<td>3</td>
<td>&#x77E9;&#x5F62;&#x521D;&#x59CB;&#x5316;</td>
<td>qcanvas.qrect.rect(...options)</td>
<td>qcanvas.rect(...options)</td>
</tr>
<tr>
<td>4</td>
<td>&#x5706;&#x521D;&#x5316;</td>
<td>qcanvas.qarc.arc(..options)</td>
<td>qcanvas.arc(..options)</td>
</tr>
<tr>
<td>5</td>
<td>&#x56FE;&#x7247;&#x521D;&#x59CB;&#x5316;</td>
<td>qcanvas.qimg.img(..options)</td>
<td>qcanvas.img(..options)</td>
</tr>
<tr>
<td>6</td>
<td>&#x6587;&#x5B57;&#x521D;&#x5316;</td>
<td>qcanvas.qtext.text(...options)</td>
<td>qcanvas.text(...options)</td>
</tr>
<tr>
<td>7</td>
<td>shape&#x521D;&#x59CB;&#x5316;</td>
<td>qcanvas.qshape.shape(..options)</td>
<td>qcanvas.shape(..options)</td>
</tr>
<tr>
<td>8</td>
<td>polygon&#x521D;&#x59CB;&#x5316;</td>
<td>qcanvas.qpolygon.polygon(...options)</td>
<td>qcanvas.polygon(...options)</td>
</tr>
<tr>
<td>9</td>
<td>spirit&#x521D;&#x59CB;&#x5316;</td>
<td>qcanvas.qspirit.spirit(...options)</td>
<td>qcanvas.spirit(...options)</td>
</tr>
<tr>
<td>10</td>
<td>layer&#x521D;&#x59CB;&#x5316;</td>
<td>qcanvas.qlayer.layer(...options)</td>
<td>qcanvas.layer(...options)</td>
</tr>
<tr>
<td>11</td>
<td>group&#x521D;&#x59CB;&#x5316;</td>
<td>qcanvas.qgroup.group(...options)</td>
<td>qcanvas.group(...options)</td>
</tr>
<tr>
<td>12</td>
<td>quadraticCurve&#x4E8C;&#x6B21;&#x66F2;&#x7EBF;&#x521D;&#x59CB;&#x5316;</td>
<td>qcanvas.qquadraticCurve.quadraticCurve(...options)</td>
<td>qcanvas.quadraticCurve(...options)</td>
</tr>
<tr>
<td>13</td>
<td>bezierCurve&#x4E09;&#x6B21;&#x66F2;&#x7EBF;&#x521D;&#x59CB;&#x5316;</td>
<td>qcanvas.qbezierCurve.bezierCurve(...options)</td>
<td>qcanvas.bezierCurve(...options)</td>
</tr>
<tr>
<td>14</td>
<td>animation&#x521D;&#x59CB;&#x5316;</td>
<td>qcanvas.qanimation.animate(...options)</td>
<td>qcanvas.animate(...options)</td>
</tr>
<tr>
<td>15</td>
<td>&#x5143;&#x7D20;&#x62FE;&#x53D6;&#x7B97;&#x6CD5;</td>
<td>&#x7EBF;&#x3001;&#x5706;&#x90FD;&#x662F;&#x8FB9;&#x7EBF;&#x53D6;&#x591A;&#x4E2A;&#x70B9;&#x7684;&#x751F;&#x6210;&#x95ED;&#x5408;&#x533A;&#x57DF;&#x6765;&#x5B9E;&#x73B0;&#x7684;&#xFF0C;&#x62FE;&#x53D6;&#x6709;&#x4E0D;&#x51C6;&#x786E;&#x7684;&#x60C5;&#x51B5;</td>
<td>&#x57FA;&#x4E8E;&#x5F71;&#x5B50;&#x753B;&#x5E03;&#x6765;&#x5B9E;&#x73B0; &#x62FE;&#x53D6;&#x66F4;&#x52A0;&#x51C6;&#x786E;</td>
</tr>
</tbody>
</table>
<h1 id="qcanvas-api-v1x">Qcanvas API v1.x</h1>
<p>Qcanvas API&#x8BF4;&#x660E;&#x6587;&#x6863;</p>
<p>&#x57FA;&#x7840;&#x529F;&#x80FD;&#x7684;&#x5F00;&#x53D1;&#x8BA1;&#x5212;<br>Qcanvas&#x4E3B;&#x7C7B; &#x968F;&#x65F6;&#x5B8C;&#x5584;<br>&#x5143;&#x7D20;&#x7C7B;</p>
<blockquote>
<p>Qline&#x7C7B; &#x57FA;&#x672C;&#x529F;&#x80FD;&#x5B8C;&#x6210;<br>Qtext&#x7C7B; &#x57FA;&#x672C;&#x529F;&#x80FD;&#x5B8C;&#x6210;<br>Qrect&#x7C7B; &#x57FA;&#x672C;&#x529F;&#x80FD;&#x5B8C;&#x6210;<br>Qarc&#x7C7B; &#x57FA;&#x672C;&#x529F;&#x80FD;&#x5B8C;&#x6210;<br>Qpolygon&#x7C7B; &#x57FA;&#x672C;&#x529F;&#x80FD;&#x5B8C;&#x6210;<br>Qshape&#x7C7B; &#x57FA;&#x672C;&#x529F;&#x80FD;&#x5B8C;&#x6210;<br>Qimg&#x7C7B; &#x57FA;&#x672C;&#x529F;&#x80FD;&#x5B8C;&#x6210;<br>Qspirit&#x7C7B; &#x57FA;&#x672C;&#x529F;&#x80FD;&#x5B8C;&#x6210;<br>QquadraticCurve&#x7C7B; &#x57FA;&#x672C;&#x529F;&#x80FD;&#x5B8C;&#x6210;<br>QbezierCurve&#x7C7B; &#x57FA;&#x672C;&#x529F;&#x80FD;&#x5B8C;&#x6210;</p>
</blockquote>
<p>&#x5BB9;&#x5668;&#x7C7B;</p>
<blockquote>
<p>Qlayer&#x7C7B; &#x57FA;&#x672C;&#x529F;&#x80FD;&#x5B8C;&#x6210;<br>Qgroup&#x7C7B; &#x57FA;&#x672C;&#x529F;&#x80FD;&#x5B8C;&#x6210;</p>
</blockquote>
<p>&#x529F;&#x80FD;&#x7C7B;</p>
<blockquote>
<p>Qanimation&#x7C7B; &#x57FA;&#x672C;&#x5B8C;&#x6210;<br>Qevent&#x7C7B; &#x57FA;&#x672C;&#x5B8C;&#x6210;</p>
<p><strong>&#x5143;&#x7D20;&#x7684;&#x62D6;&#x52A8;</strong><br>&#x5F53;&#x524D;&#x7248;&#x672C;v1.0&#x4E2D;&#xFF0C;&#x5982;&#x679C;&#x67D0;&#x4E2A;&#x5143;&#x7D20;&#x521B;&#x5EFA;&#x65F6;&#x7684;&#x521D;&#x59CB;&#x4F4D;&#x7F6E;&#x6570;&#x636E;&#x662F;&#x4F9D;&#x8D56;&#x5176;&#x5B83;&#x5143;&#x7D20;&#x7684;&#xFF08;&#x4F4D;&#x7F6E;&#x662F;&#x901A;&#x8FC7;&#x4E00;&#x4E2A;&#x51FD;&#x6570;&#x8FD4;&#x56DE;&#x7684;&#xFF09;<br>&#x90A3;&#x4E48;&#x4E00;&#x65E6;&#x5B83;&#x88AB;&#x62D6;&#x52A8;&#xFF0C;&#x90A3;&#x4E48;&#x5B83;&#x7684;&#x4F4D;&#x7F6E;&#x6570;&#x636E;&#x5C31;&#x4F1A;&#x53D8;&#x6210;&#x6570;&#x503C;&#x578B; &#x548C;&#x4F9D;&#x8D56;&#x5143;&#x7D20;&#x5C31;&#x4F1A;&#x65AD;&#x5F00;&#x8054;&#x7CFB; &#x5207;&#x8BB0;&#x8FD9;&#x70B9;</p>
<p>&#x5982;&#x679C;&#x4E00;&#x4E2A;&#x5143;&#x7D20;&#x7684;&#x5C5E;&#x6027;display:none &#x8BE5;&#x5143;&#x7D20;&#x4E0A;&#x7684;&#x4E8B;&#x4EF6;&#x4E0D;&#x4F1A;&#x6267;&#x884C; &#x56E0;&#x4E3A;&#x4E0D;&#x4F1A;&#x753B;&#x5728;&#x753B;&#x5E03;&#x4E0A;<br>&#x5982;&#x679C;&#x4E00;&#x4E2A;&#x5143;&#x7D20;&#x7684;&#x5C5E;&#x6027;pointerEvent:&apos;none&apos; &#x8BE5;&#x5143;&#x7D20;&#x4E0A;&#x7684;&#x4E8B;&#x4EF6;&#x4E0D;&#x4F1A;&#x54CD;&#x5E94;</p>
<p><strong>&#x52A8;&#x753B;</strong><br>&#x5F53;isLoop = true&#x65F6;&#xFF0C;&#x52A8;&#x753B;&#x6BCF;&#x6B21;&#x6267;&#x884C;&#x5230;&#x7ED3;&#x675F;&#x4F4D;&#x7F6E;&#x90FD;&#x4F1A;&#x6267;&#x884C;finished&#x65B9;&#x6CD5;<br>&#x5F53;isLoop&#x662F;&#x6570;&#x503C;&#x65F6;&#xFF0C;&#x52A8;&#x753B;&#x4E00;&#x76F4;&#x6267;&#x884C;&#x6307;&#x5B9A;&#x6B21;&#x6570;&#x65F6;&#x624D;&#x4F1A;&#x6267;&#x884C;finished&#x65B9;&#x6CD5;</p>
</blockquote>
<p>Qlayer&#x5143;&#x7D20;&#x7C7B;</p>
<blockquote>
<p>&#x5B9E;&#x8D28;&#x4E0A;&#x662F;&#x4E00;&#x4E2A;<strong>&#x62BD;&#x8C61;</strong>&#x7684;&#x5143;&#x7D20;&#x5BB9;&#x5668;&#x7C7B; &#x4E3A;&#x4E86;&#x5BB9;&#x7EB3;&#x5176;&#x5B83;&#x5143;&#x7D20;&#x3002;&#xFF08;&#x5BBD;&#x9AD8;&#x548C;&#x4E3B;&#x753B;&#x5E03;&#x4E00;&#x6837;&#xFF09;<br>1&#x3001;&#x5F53;&#x6211;&#x4EEC;&#x4E0D;&#x4F7F;&#x7528;Qlayer&#x65F6; &#x5143;&#x7D20;&#x76F4;&#x63A5;&#x753B;&#x5728;&#x4E3B;&#x753B;&#x5E03;&#x4E0A;&#xFF1B;<br>2&#x3001;&#x5F53;&#x4F7F;&#x7528;Qlayer&#x65F6; Qcanvas&#x4F1A;&#x5148;&#x521B;&#x5EFA;&#x4E00;&#x4E2A;&#x4E34;&#x65F6;&#x7684;canvas&#x753B;&#x5E03; &#x628A;&#x6307;&#x5B9A;&#x8981;&#x653E;&#x5230;&#x8BE5;Qlayer&#x5BB9;&#x5668;&#x5185;&#x7684;&#x5143;&#x7D20;&#x5148;&#x753B;&#x8FD9;&#x4E2A;&#x4E34;&#x65F6;canvas&#x4E0A;&#xFF0C;&#x6700;&#x540E;&#x5728;requestNextAnimationFrame&#x7684;&#x63A7;&#x5236;&#x4E0B;&#x518D;&#x628A;&#x8FD9;&#x4E2A;&#x753B;&#x5E03;&#x753B;&#x5230;&#x4E3B;&#x753B;&#x5E03;&#x4E0A;  &#x5F53;&#x7136;&#x4E34;&#x65F6;canvas&#x4E5F;&#x5728;requestNextAnimationFrame&#x63A7;&#x5236;&#x4E0B;&#x4E0D;&#x505C;&#x7684;&#x91CD;&#x7ED8; &#x6240;&#x4EE5;&#x73B0;&#x5728;&#x6846;&#x67B6;&#x5B9E;&#x73B0;&#x7684;&#x8FD9;&#x4E9B;&#x5143;&#x7D20;(&#x9664;Qlayer&#x548C;Qgroup)&#x90FD;&#x53EF;&#x4EE5;&#x6307;&#x5B9A;&#x5230;&#x4E00;&#x4E2A;Qlayer&#x5BF9;&#x8C61;&#x4E0A;<br>3&#x3001;&#x4F7F;&#x7528;Qlayer&#x5143;&#x7D20;&#x7684;&#x597D;&#x5904;&#xFF1A;&#x53EF;&#x4EE5;&#x4E00;&#x6B21;&#x6027;&#x63A7;&#x5236;&#x4E00;&#x6279;&#x5143;&#x7D20;&#x7684;&#x663E;&#x793A;&#x3001;&#x9690;&#x85CF;&#x3001;&#x5220;&#x9664;&#x3001;&#x5C42;&#x7EA7;&#x5173;&#x7CFB;&#x7B49;<br>4&#x3001;&#x5220;&#x9664;Qlayer&#x5143;&#x7D20; &#x4F1A;&#x540C;&#x65F6;&#x5220;&#x9664;&#x5B83;&#x6240;&#x5BB9;&#x7EB3;&#x7684;&#x6240;&#x6709;&#x5143;&#x7D20;<br>5&#x3001;&#x5728;Qlayer&#x91CC;&#x7684;&#x6240;&#x6709;&#x5143;&#x7D20;&#x5C42;&#x7EA7;&#x5173;&#x7CFB;&#x90FD;&#x662F;&#x57FA;&#x4E8E;&#x8BE5;Qlayer&#x5B9E;&#x4F8B;&#x7684;&#x3002;<br>Qcanvas&#x7684;&#x4EE5;&#x4E0B;&#x65B9;&#x6CD5; &#x5BF9;Qlayer&#x5143;&#x7D20;&#x5BB9;&#x5668;&#x5185;&#x7684;&#x5143;&#x7D20;&#x65E0;&#x6548; &#x5982;&#x679C;&#x9700;&#x8981;&#x8C03;&#x6574;&#x5C42;&#x7EA7;&#x5173;&#x7CFB; &#x9700;&#x8981;&#x8C03;&#x7528;Qlayer&#x7684;&#x76F8;&#x5E94;&#x65B9;&#x6CD5;    </p>
</blockquote>
<table>
<thead>
<tr>
<th style="text-align:left">&#x65B9;&#x6CD5;</th>
<th style="text-align:left">&#x5907;&#x6CE8;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">lower</td>
<td style="text-align:left">&#x628A;&#x5143;&#x7D20;&#x964D;&#x4F4E;&#x4E00;&#x4E2A;&#x5C42;&#x7EA7; (&#x53C2;&#x6570;&#x4E3A;&#x5143;&#x7D20;&#x5BF9;&#x8C61;)</td>
</tr>
<tr>
<td style="text-align:left">lowerToBottom</td>
<td style="text-align:left">&#x628A;&#x5143;&#x7D20;&#x5C42;&#x7EA7;&#x7F6E;&#x5E95;(&#x53C2;&#x6570;&#x4E3A;&#x5143;&#x7D20;&#x5BF9;&#x8C61;)</td>
</tr>
<tr>
<td style="text-align:left">raise</td>
<td style="text-align:left">&#x628A;&#x5143;&#x7D20;&#x63D0;&#x9AD8;&#x4E00;&#x4E2A;&#x5C42;&#x7EA7;(&#x53C2;&#x6570;&#x4E3A;&#x5143;&#x7D20;&#x5BF9;&#x8C61;)</td>
</tr>
<tr>
<td style="text-align:left">raiseToTop</td>
<td style="text-align:left">&#x628A;&#x5143;&#x7D20;&#x5C42;&#x7EA7;&#x7F6E;&#x9876;(&#x53C2;&#x6570;&#x4E3A;&#x5143;&#x7D20;&#x5BF9;&#x8C61;)</td>
</tr>
</tbody>
</table>
<p>set&#x7C7B;&#x65B9;&#x6CD5;</p>
<blockquote>
<p>&#x6B64;&#x7C7B;&#x65B9;&#x6CD5;&#x662F;&#x6839;&#x636E;&#x5BF9;&#x8C61;&#x7684;&#x521D;&#x59CB;&#x5C5E;&#x6027;&#x81EA;&#x52A8;&#x751F;&#x6210;&#x7684;&#xFF0C;&#x7ED9;&#x5BF9;&#x8C61;&#x8D4B;&#x52A0;&#x81EA;&#x5B9A;&#x4E49;&#x7684;&#x521D;&#x59CB;&#x5C5E;&#x6027;&#xFF0C;&#x4E5F;&#x4F1A;&#x81EA;&#x52A8;&#x6DFB;&#x52A0;&#x76F8;&#x5E94;&#x7684;&#x65B9;&#x6CD5;<br>&#x683C;&#x5F0F;&#x4E3A; set+&#x5C5E;&#x6027;&#x540D;&#x79F0;&#xFF08;&#x5C5E;&#x6027;&#x9996;&#x5B57;&#x6BCD;&#x4F1A;&#x81EA;&#x52A8;&#x8F6C;&#x6362;&#x4E3A;&#x5927;&#x5199;&#xFF09;&#xFF1B;&#x6267;&#x884C;&#x65B9;&#x6CD5;&#x65F6;&#x8FD4;&#x56DE;&#x5F53;&#x524D;&#x5BF9;&#x8C61;&#xFF0C;&#x6240;&#x4EE5;&#x652F;&#x6301;&#x94FE;&#x5F0F;&#x8C03;&#x7528;
&#x4F8B;&#x5982;&#x4E00;&#x4E2A;Qtext&#x5BF9;&#x8C61;text&#x53EF;&#x4EE5;&#x8FDB;&#x884C;&#x5982;&#x4E0B;&#x64CD;&#x4F5C;
text.setColor(&apos;red&apos;).setText(&apos;hello world&apos;);</p>
</blockquote>
<p>&#x6846;&#x67B6;&#x5F15;&#x5165;&#x65B9;&#x6CD5;</p>
<blockquote>
<h5 id="&#x65B9;&#x6CD5;&#x4E00;">&#x65B9;&#x6CD5;&#x4E00;</h5>
<p>npm&#x5B89;&#x88C5;</p>
<blockquote>
<p>&#x5B89;&#x88C5;&#x4F9D;&#x8D56;&#xFF1A;npm install qcanvas<br>&#x9875;&#x9762;&#x5BFC;&#x5165;&#xFF1A;  import {Qcanvas} from &apos;qcanvas&apos;;</p>
</blockquote>
<h5 id="&#x65B9;&#x6CD5;&#x4E8C;">&#x65B9;&#x6CD5;&#x4E8C;</h5>
<p>&#x4F7F;&#x7528;script&#x6807;&#x7B7E;&#x76F4;&#x63A5;&#x5F15;&#x7528;</p>
</blockquote>
<p>Qcanvas1.x&#x6574;&#x4F53;&#x67B6;&#x6784;&#x56FE;</p>
<p><a href="assets/newjg.png" data-lightbox="f7420b36-6a8b-4544-bee6-b02da353d4fb" data-title="newjg"><img src="assets/newjg.png" alt="newjg"></a></p>
<footer class="page-footer"><span class="copyright">&#xA9; Qcanvas all right reserved&#xFF0C;powered by Gitbook</span><span class="footer-modification">&#x6587;&#x4EF6;&#x4FEE;&#x8BA2;&#x65F6;&#x95F4;&#xFF1A;
2021-09-17 15:37:48
</span></footer>
                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                
                <a href="qcanvas.html" class="navigation navigation-next navigation-unique" aria-label="Next page: Qcanvas类">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"Qcanvas说明","level":"1.1","depth":1,"next":{"title":"Qcanvas类","level":"1.2","depth":1,"path":"qcanvas.md","ref":"qcanvas.md","articles":[{"title":"属性","level":"1.2.1","depth":2,"path":"qcanvas/shu-xing.md","ref":"qcanvas/shu-xing.md","articles":[]},{"title":"方法","level":"1.2.2","depth":2,"path":"qcanvas/fang-fa.md","ref":"qcanvas/fang-fa.md","articles":[]}]},"dir":"ltr"},"config":{"plugins":["expandable-chapters-small","tbfed-pagefooter","sidebar-style","auto-scroll-table","code-editor","code","lightbox"],"styles":{"website":"example/style/website.css"},"pluginsConfig":{"sidebar-style":{"author":"志成","title":"Qcanvas V1.0使用文档"},"tbfed-pagefooter":{"copyright":"&copy Qcanvas","modify_label":"文件修订时间：","modify_format":"YYYY-MM-DD HH:mm:ss"},"search":{},"auto-scroll-table":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"code-editor":{},"code":{"copyButtons":true},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"lightbox":{"jquery":true,"sameUuid":false},"expandable-chapters-small":{},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","author":"lizhicheng","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"Qcanvas V1.0使用文档","output.name":"Qcanvas V1.0使用文档","gitbook":"*","description":"Qcanvas V1.0使用文档"},"file":{"path":"README.md","mtime":"2021-09-17T07:37:48.940Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2022-05-18T10:04:11.263Z"},"basePath":".","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="gitbook/gitbook.js"></script>
    <script src="gitbook/theme.js"></script>
    
        
        <script src="gitbook/gitbook-plugin-expandable-chapters-small/expandable-chapters-small.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-sidebar-style/plugin.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-auto-scroll-table/plugin.js"></script>
        
    
        
        <script src="http://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js"></script>
        
    
        
        <script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.2.3/ace.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-code-editor/editor.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-code/plugin.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-lightbox/js/lightbox.min.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

